Skip to content

Add a repin command - #2

Merged
ThisIsTJ merged 1 commit into
mainfrom
feat/repin-command
Aug 21, 2026
Merged

ThisIsTJ merged 1 commit into
mainfrom
feat/repin-command

Conversation

@ThisIsTJ

Copy link
Copy Markdown
Collaborator

Repinning a content repo onto a new kit tag had two traps. The v1.2.0 rollout hit the first one.

The silent no-op

npm install alone does not repin. package-lock.json records the resolved commit of the previous tag, so npm honours the lock and keeps the old kit even though package.json names a new tag. The install prints "changed 1 package" and exits 0.

During the v1.2.0 rollout one repo got a commit claiming to repin while still running 1.0.1. It was caught only by running workshop-kit --version by hand. Nothing in the pipeline would have failed.

The fence hash

A release that touches agents/base.md moves the AGENTS.md fence hash, so a repin that does not regenerate leaves agents check failing in a repo that otherwise looks fine.

What the command does

workshop-kit repin <tag>:

  1. Refuses a tag that is not on the remote before touching package.json, so a typo cannot leave the repo half-modified.
  2. Forces re-resolution with the explicit npm install <pkg>@<spec> form.
  3. Asserts the installed version matches the tag — the guard against the silent no-op.
  4. Regenerates AGENTS.md as part of the same operation, not as a follow-up.
  5. Runs agents check, validate-config, typecheck and build before reporting success.

Verification

Tested with a real version change, not a dry run. On maestro-workshop: downgraded to v1.1.0 and back to v1.2.0.

  • Installed version followed the tag both directions.
  • Fence hash tracked with it: 29a89812 → 199aad91 → 29a89812.
  • The working tree returned to exactly its committed state.

Error paths: missing tag, unknown tag, and running outside a content repo all fail cleanly with a usable message.

Also

The README now documents the release-and-repin flow, including that Dependabot does not and will not propose these bumps for a github: tag dependency — verified in practice, and the dead group is being removed from the four content repos.

Note the bootstrap: v1.2.0 does not have this command, so the first repin onto v1.3.0 runs from a kit checkout. Every repin after that works via npx workshop-kit repin <tag>.

🤖 Generated with Claude Code

Repinning a content repo onto a new kit tag had two traps, and the v1.2.0
rollout hit the first one:

`npm install` alone does not repin. package-lock.json records the resolved
COMMIT of the previous tag, so npm honours the lock and keeps the old kit even
though package.json names a new tag. The install prints "changed 1 package" and
exits 0. One repo got a commit claiming to repin while still running the old
kit; it was caught only by running `workshop-kit --version` by hand.

Second, a release that touches agents/base.md moves the AGENTS.md fence hash, so
a repin that does not regenerate leaves `agents check` failing in a repo that
otherwise looks fine.

`workshop-kit repin <tag>` closes both: it forces re-resolution with the
explicit spec form, then asserts the installed version actually matches the tag,
regenerates AGENTS.md as part of the same operation, and runs agents check,
validate-config, typecheck and build before reporting success. It refuses a tag
that is not on the remote before touching package.json, so a typo cannot leave
the repo half-modified.

Verified end to end on maestro-workshop: a real downgrade to v1.1.0 (fence
tracked back to 199aad91) and back up to v1.2.0 (fence 29a89812) returned the
working tree to exactly its committed state. Error paths checked too — missing
tag, unknown tag, and running outside a content repo.

The README now documents the release-and-repin flow, including that Dependabot
does not and will not propose these bumps for a github: tag dependency.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ThisIsTJ
ThisIsTJ merged commit cbdb9a9 into main Aug 21, 2026
1 check passed
@ThisIsTJ
ThisIsTJ deleted the feat/repin-command branch August 27, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant